home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dfpp01.zip / MENUS.CPP < prev    next >
C/C++ Source or Header  |  1992-11-22  |  2KB  |  93 lines

  1. // ---------- menus.cpp
  2.  
  3. #include "dflatpp.h"
  4. #include "testappl.h"
  5.  
  6. MenuSelection
  7.     PushButtonCommand  ("~Push button",  APWND::BuildPushButton),
  8.     CheckBoxCommand    ("~Check box",    APWND::BuildCheckBox),
  9.     RadioButtonCommand ("~Radio button", APWND::BuildRadioButton);
  10.  
  11. // ---------- cascaded button menu
  12. MenuSelection *Button[] = {
  13.     &PushButtonCommand,
  14.     &CheckBoxCommand,
  15.     &RadioButtonCommand,
  16.     &SelectionTerminator
  17. };
  18.  
  19. MenuSelection
  20.     NewCommand     ("~New" ),
  21.     OpenCommand    ("~Open" ),
  22.     PrintCommand   ("~Print", NULLFUNC, 0, False),
  23.     SetupCommand   ("Print ~Setup"),
  24.     ExitCommand    ("E~xit      [Alt+F4]", APWND::Exit, ALT_F4);
  25.  
  26. MenuSelection
  27.     UndoCommand  ( "~Undo",      NULLFUNC, CTRL_U),
  28.     CutCommand   ( "Cu~t",       NULLFUNC, CTRL_C),
  29.     CopyCommand  ( "~Copy",      NULLFUNC, CTRL_V),
  30.     PasteCommand ( "~Paste",     NULLFUNC, CTRL_X),
  31.     ClearCommand ( "Cl~ear"),
  32.     DelCommand   ( "~Delete",    NULLFUNC, DEL),
  33.     ParaCommand  ( "Pa~ragraph", NULLFUNC, CTRL_P);
  34.  
  35. MenuSelection
  36.     InsertCommand   ("~Insert    [Ins]", APWND::BuildInsertMode, On, INS ),
  37.     WordWrapCommand ("~Word wrap", NULLFUNC, On );
  38.                
  39. MenuSelection
  40.     TextBoxCommand ("~Textbox", APWND::BuildTextBox ),
  41.     ListBoxCommand ("~Listbox", APWND::BuildListBox ),
  42.     EditBoxCommand ("~Editbox", APWND::BuildEditBox ),
  43.     ButtonCommand  ("~Buttons", Button );
  44.  
  45. MenuSelection *File[] = {
  46.     &NewCommand,
  47.     &OpenCommand,
  48.     &SelectionSeparator,
  49.     &PrintCommand,
  50.     &SetupCommand,
  51.     &SelectionSeparator,
  52.     &ExitCommand,
  53.     &SelectionTerminator
  54. };
  55.  
  56. MenuSelection *Edit[] = {
  57.     &UndoCommand,
  58.     &SelectionSeparator,
  59.     &CutCommand,
  60.     &CopyCommand,
  61.     &PasteCommand,
  62.     &SelectionSeparator,
  63.     &ClearCommand,
  64.     &DelCommand,
  65.     &SelectionSeparator,
  66.     &ParaCommand,
  67.     &SelectionTerminator
  68. };
  69.  
  70. MenuSelection *Demos[] = {
  71.     &TextBoxCommand,
  72.     &ListBoxCommand,
  73.     &EditBoxCommand,
  74.     &ButtonCommand,
  75.     &SelectionTerminator
  76. };
  77.  
  78. MenuSelection *Options[] = {
  79.     &InsertCommand,
  80.     &WordWrapCommand,
  81.     &SelectionTerminator
  82. };
  83.  
  84. MenuBarItem MainMenu[] = {
  85.     MenuBarItem( "~File",    File    ),
  86.     MenuBarItem( "~Edit",    Edit    ),
  87.     MenuBarItem( "~Demos",   Demos   ),
  88.     MenuBarItem( "~Options", Options ),
  89.     MenuBarItem(MENU_TERMINATOR)
  90. };
  91.  
  92.  
  93.